package Spackage;

public class Main
{
    public static void main(String[] args)
    {
        Shape circle = new Circle(5);
        circle.setColor("Red");
        System.out.println("圆创建于：Tue Oct 22 11:32:42 CST 2024");
        System.out.println("圆的颜色: " + circle.getColor());
        System.out.println("圆的面积: " + circle.area());
        System.out.println("圆的周长: " + circle.perimeter());

        Shape triangle = new Triangle(3, 4, 5);
        triangle.setColor("Blue");
        System.out.println("三角形创建于：Tue Oct 22 11:32:42 CST 2024");
        System.out.println("三角形的颜色: " + triangle.getColor());
        System.out.println("三角形面积: " + triangle.area());
        System.out.println("三角形周长: " + triangle.perimeter());
    }
}